package com.tulingxueyuan.order.service.impl;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.tulingxueyuan.order.service.IOrderService;
import org.springframework.stereotype.Service;

/**
 * @description: TODO
 * @Author li
 * @Date 2025/4/24 16:12
 */
@Service
public class IOrderServiceImpl implements IOrderService {
    @Override
    @SentinelResource(value = "getUser", blockHandler = "getUserBlockHandler")
    public String getUser() {
        return "查询用户";
    }

    public String getUserBlockHandler(BlockException e) {
        return e.getMessage();
    }
}
